#include "main.h"

void InitSDLCOLOR(SDL_Color *couleur, int r, int g, int b)
{
    couleur->r = r;
    couleur->g = g;
    couleur->b = b;
    couleur->unused = 0;
}

void nouvelle_partie(FenetreJeu *jeu, Header *header, Cloture *grille)
{
    header->temps = SDL_GetTicks();
    header->temps2 = 0;
    header->stopTemps = 0;
    jeu->active = 1;
    header->aide = 1;
    nouveau_sudoku(grille->grille, grille->grille_af, grille->grille_or, grille->grille_cr, header->difficulte);
}

int score (Header *header)
{
    int checksum = 0;

    if(header->difficulte == EASY)
    checksum = 53;

    else if (header->difficulte == NORMAL)
    checksum = 74;

    else if (header->difficulte == HARD)
    checksum = 95;

    else
    checksum = 116;

    if(header->aide)
    checksum += 22;

    checksum -= header->m;

    return (checksum * 2);
}
